package org.jeecg.modules.kuybFeilb.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.kuybFeilb.entity.KuybFeilb;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: kuyb_feilb
 * @Author: jeecg-bootServiceLifeStart
 * @Date:   2021-09-13 goumnx
 * @Version: V1.0
 */
public interface KuybFeilbMapper extends BaseMapper<KuybFeilb> {

//    @Select("select * from kuyb_feilb where car_Train=#{carTrain } and #{priceStart } BETWEEN price_Start and price_end and product_Id=#{productId }" +
//            "and  policy_time_mileage=#{policyTimeMileage } and warranty_policy_time=#{warrantyPolicyTime } and nengylx=${nengylx }")

    @Select("select * from kuyb_feilb where #{priceStart } BETWEEN price_Start and price_end and product_Id=#{productId }" +
            "and  policy_time_mileage=#{policyTimeMileage } and warranty_policy_time=#{warrantyPolicyTime } and nengylx=${nengylx }")
    KuybFeilb getPremiumByParam(KuybFeilb kuybFeilb);

//    @Select("<script>   select *,item.`item_text` goumnxName from kuyb_feilb f LEFT JOIN sys_dict_item item ON f.`policy_time_mileage`= item.`item_value` AND item.`dict_id`='1438418148669345794' where car_Train=#{carTrain } and #{priceStart } BETWEEN price_Start and price_end and product_Id=#{productId }" +
//            " <if test='carTrain != 5'> and warranty_policy_time=#{warrantyPolicyTime } </if> and nengylx=${nengylx }  order by item.item_value </script>")

    @Select(" select *,item.`item_text` goumnxName from kuyb_feilb f LEFT JOIN sys_dict_item item ON f.`policy_time_mileage`= item.`item_value` AND item.`dict_id`='1438418148669345794' where  #{priceStart } BETWEEN price_Start and price_end and product_Id=#{productId }" +
            " and warranty_policy_time=#{warrantyPolicyTime } and nengylx=${nengylx }  order by item.item_value ")
    List<KuybFeilb> getStandards(KuybFeilb kuybFeilb);
}
